/**
  * Copyright (c) CSIRO Australia, 2009
  *
  * @author $Author: jia020 $
  * @version $Id: Registration.java 643 2009-05-20 00:20:55Z jia020 $
  */
package au.csiro.nt.pdsp.register;

/**
 * @author jia020
 *
 */
public class Registration {
	private User user;
	public boolean addUser(User user) throws RegisterException{
		//preProcessing
		
		//Rules checking on the data of user's information. 
		if (checkUserInfo() == true) 
			return true;
		return false;
	}
	public boolean modifyUser(User user) throws RegisterException{
		//preProcessing
		
		//Rules checking on the data of user's information. 
		if (checkUserInfo() == true) 
			return true;
		return false;
	}
	public boolean deleteUser(String userID) throws RegisterException{
		return true;
	}	
	//Rules checking on the data of user's information. 	
	private boolean checkUserInfo() {
		String ret = user.ruleChecking();
		if (ret.equalsIgnoreCase("OK"))
			return true;
		return false;
	}
}
